<template>
    <div id="app">
        <!--<img alt="Vue logo" src="./assets/logo.png">-->
        <router-view/>
<!--        <layout></layout>-->
    </div>
</template>

<script>
    // import Layout from "@/layout/index";
    export default {
        name: 'App',
        components: {},
        created() {
            if (sessionStorage.getItem('store')) {
                this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store'))))
                console.log('load session storage')
            }
            window.addEventListener('beforeunload', () => {
                sessionStorage.setItem('store', JSON.stringify(this.$store.state))
            })
        }
    }
</script>


